package com.hangxintong.common.feign;

import com.hangxintong.common.base.entity.LmOrder;
import com.hangxintong.common.base.entity.LmOrderGoods;
import com.hangxintong.common.config.FeignConfiguration;
import com.hangxintong.common.utils.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * mxf
 */
@FeignClient(value = "coalition", configuration = FeignConfiguration.class)
public interface OrderFeign {
    /**
     * 生成会费支付订单
     *
     * @param lmOrder
     * @return
     * @author mxf 2020-12-23
     */
    @PostMapping(value = "/order/dues")
    Result generateDuesOrder(@RequestBody LmOrder lmOrder, @RequestParam(name = "orderIds",defaultValue = "") List<String> orderIds);

    /**
     * 删除订单
     * @param id
     * @return
     * @author mxf 2020-12-23
     */
    @PostMapping("/order/delOrder")
    Result delOrder(@RequestParam(value = "id", defaultValue = "", required = false) String id);



    @PostMapping(value = "/order/saveActivityOrder")
    Result saveActivityOrder(@RequestBody LmOrder lmOrder);
    /**
     * @Description 查询我的报名列表
     * @Author      Mr.zyg
     * @Date        2021-01-22 15:35
     */
    @GetMapping(value = "/order/getSingOrders")
    Result getSingOrders(@RequestParam Integer createId,@RequestParam Long oid);

    @PostMapping("/order/info")
    Result info(@RequestParam(value = "id", defaultValue = "", required = false) String id);


    /**
     * @Description 0元支付
     * @Author      Mr.zyg
     * @Date        2021-02-02 9:58
     */
    @PostMapping("/order/newpayOrder")
    Result newPayOrder(@RequestParam(value = "orderId", defaultValue = "", required = false) String orderId);


    /**
     * 通过支付宝的单号查询订单详情
     *
     * @param payWayNum
     * @return
     * @author mxf 2021-02-25
     */
    @GetMapping("/order/payWayNum/{payWayNum}")
    Result findFirstByPayWayNumAndStatus(@PathVariable("payWayNum") String payWayNum);

}
